﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Login</title>
    <script src="~/Content/js/jquery-3.1.1.min.js"></script>
    <script src="~/Content/js/assembly.js"></script>
    <link href="~/Content/css/assembly.css" rel="stylesheet" />
    <style>
        body {
            height: auto;
        }

        .login {
            width: 280px;
            height: auto;
            box-shadow: #ccc 0px 0px 10px;
            text-align: center;
            background-color: #fff;
            margin: auto;
            padding: 40px 35px 50px 35px;
            margin-top: 10%;
        }

        hr {
            border: 0;
            border-top: #ccc 1px solid;
            margin: 20px 0;
        }

        .login input {
            width: 80%;
            display: block;
            margin: auto;
            font-size: 14px;
            padding: 7px 5px;
            margin-bottom: 20px;
            outline: none;
            border: 1px #ccc solid;
        }

        input:-webkit-autofill {
            -webkit-box-shadow: 0 0 0px 1000px white inset;
        }

        .login .img {
            display: block;
            margin: auto;
        }

        .login a img {
            width: 21px;
            height: 21px;
            margin-bottom: -6px;
            margin-right: 5px;
        }

        .login a {
            font-size: 14px;
            padding: 10px 20px 10px 18px;
            border: 1px #ccc solid;
        }
    </style>
</head>
<body>
    <div class="login">
        <img class="img" src="/Content/images/loginlogo.png" width="250" />
        <hr />
        <input type="text" id="account" value="admin" />
        <input type="password" id="password" style="margin-bottom:30px;" value="123456" />
        <a href="#" onclick="onclick_login()" class="tc_img_btn">
            <img src="/Content/icons/orderok.png" />
            登 录
        </a>
    </div>
    <script>
        function onclick_login() {
            tc.loading(".login")
            var account = $("#account").val();
            var password = $("#password").val();
            if (account != "" && password != "") {
                $.post("/Home/LoginAjax", { account: account, password: password }, function (data) {
                    var json = eval(data);
                    if (json.status == 0) {
                        tc.alert(json.message);
                        tc.loadexit();
                    } else {
                        window.location = "/Member/Index";
                    }
                });
            } else {
                tc.alert("请输入完整信息！");
            }
        };
        $(document).keyup(function (e) {
            if (e.keyCode == 13) {
                onclick_login();
            }
        })
    </script>
</body>
</html>
